<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">添加技师</h4>
    <button ui-sref="app.shopTechnician" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>
<div class="wrapper" ng-controller="shopTechnicianAddCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            添加技师信息
        </div>
        <div class="panel-body">
            <div class="panel-default panel-body">
                <form name="technicianInfo" class="form-horizontal form-validation" ng-submit="addTechnician()">
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">照片</label>
                        <div class="col-sm-5">
                            <uploadpic queue-limit="{{frontLimit}}" path="{{path}}" app="app" queue="frontImgQueue"></uploadpic>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">技师编号</label>
                        <div class="col-sm-5">
                            <input type="text" ng-model="shopTechnicianVO.num" name="num" class="form-control" placeholder="请输入技师编号" required>
                        </div>
                        <div class="col-sm-5 form-text" ng-if="technicianInfo.num.$touched">
                            <span class="text-danger" ng-if="technicianInfo.num.$error.required">技师编号是必填的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">技师姓名</label>
                        <div class="col-sm-5">
                            <input type="text" ng-model="shopTechnicianVO.name" name="name" class="form-control" placeholder="请输入技师姓名" required>
                        </div>
                        <div class="col-sm-5 form-text" ng-if="technicianInfo.name.$touched">
                            <span class="text-danger" ng-if="technicianInfo.name.$error.required">技师姓名是必填的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">性别</label>
                        <div class="col-sm-5">
                            <div class="radio">
                                <label class="i-checks i-checks-sm">
                                    <input type="radio" name="gender" ng-model="shopTechnicianVO.gender" value="0">
                                    <i></i>
                                    女
                                </label>
                                <label class="i-checks i-checks-sm">
                                    <input type="radio" name="gender" ng-model="shopTechnicianVO.gender" value="1">
                                    <i></i>
                                    男
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">联系方式</label>
                        <div class="col-sm-5">
                            <input type="text" ng-model="shopTechnicianVO.mobilePhone" name="mobilePhone" placeholder="请填写联系方式" class="form-control" required>
                        </div>
                        <div class="col-sm-5 form-text" ng-if="technicianInfo.mobilePhone.$touched">
                            <span class="text-danger" ng-if="technicianInfo.mobilePhone.$error.required">联系方式是必填的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">技师职位</label>
                        <div class="col-sm-5">
                            <input type="text" ng-model="shopTechnicianVO.position" name="position" placeholder="请填写技师职位" class="form-control" required>
                        </div>
                        <div class="col-sm-5 form-text" ng-if="technicianInfo.position.$touched">
                            <span class="text-danger" ng-if="technicianInfo.position.$error.required">技师职位是必填的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">每段时间最多可预约客户数量</label>
                        <div class="col-sm-1">
                            <input type="number" ng-model="shopTechnicianVO.number" step="1" min="0" name="number" placeholder="例如：4" class="form-control" required>
                        </div>
                        <div class="col-sm-3 form-text" ng-if="technicianInfo.number.$touched">
                            <span class="text-danger" ng-if="technicianInfo.number.$error.required">客户数量是必填的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">工作日期</label>
                        <div class="col-sm-5">
                            <div class="inline pos-rlt m-r-xs" ng-class="{true:'week-select',false:''}[item.state]" ng-click="item.state=!item.state;" ng-repeat="item in weeks">
                                <div class="week-border">{{item.name}}</div>
                                <div class="select-bar"></div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">上班时间</label>
                        <div class="col-sm-3 ">
                            <div class="inline m-r-xs">
                                <select ng-model="shopTechnicianVO.workStartTime" name="workStartTime" class="form-control w-sm inline h6" ng-options="item for item in times" required>
                                    <option value="">开始时间</option>
                                </select>
                                <p class="inline m-r-xs m-l-xs">至</p>
                                <select ng-model="shopTechnicianVO.workEndTime" name="workEndTime" class="form-control w-sm inline h6" ng-options="item for item in times" required>
                                    <option value="">结束时间</option>
                                </select>
                            </div>
                            <div class="form-text inline m-l-sm" ng-if="technicianInfo.workStartTime.$touched">
                                <span class="text-danger" ng-if="technicianInfo.workStartTime.$error.required">上班开始时间是必须填的</span>
                            </div>
                            <div class="form-text inline m-l-sm" ng-if="technicianInfo.workEndTime.$touched">
                                <span class="text-danger" ng-if="technicianInfo.workEndTime.$error.required">上班结束时间是必须填的</span>
                            </div>
                        </div>
                        <div class="col-sm-3 no-padder m-l-n-xxl" ng-if="shopTechnicianVO.isOpen==0">
                            <div class="inline m-t-sm ">
                                <a ng-click="shopTechnicianVO.isOpen=1" class="text-info inline h5 ">添加休息时间</a>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" ng-if="shopTechnicianVO.isOpen==1">
                        <label class="col-sm-2 control-label font-bold">休息时间</label>
                        <div class="col-sm-5">
                            <div class="inline m-r-xs">
                                <select ng-model="shopTechnicianVO.restStartTime" name="restStartTime" class="form-control w-sm inline h6" ng-options="item for item in times" required>
                                    <option value="">开始时间</option>
                                </select>
                                <p class="inline m-r-xs m-l-xs">至</p>
                                <select ng-model="shopTechnicianVO.restEndTime" name="restEndTime" class="form-control w-sm inline h6" ng-options="item for item in times" required>
                                    <option value="">结束时间</option>
                                </select>
                            </div>
                            <div class="form-text inline m-l-sm" ng-if="technicianInfo.restStartTime.$touched">
                                <span class="text-danger" ng-if="technicianInfo.restStartTime.$error.required">休息开始时间是必须填的</span>
                            </div>
                            <div class="form-text inline m-l-sm" ng-if="technicianInfo.restEndTime.$touched">
                                <span class="text-danger" ng-if="technicianInfo.restEndTime.$error.required">休息结束时间是必须填的</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">简介</label>
                        <div class="col-sm-5">
                            <textarea class="form-control" name="explain" ng-model="shopTechnicianVO.explain" required></textarea>
                        </div>
                        <div class="form-text" ng-if="technicianInfo.explain.$touched">
                            <span class="text-danger" ng-if="technicianInfo.explain.$error.required">技师简介是必须填的</span>
                        </div>
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button type="submit" class="btn btn-success" ng-disabled="technicianInfo.$invalid">保存</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

</div>